package compare;

import java.util.Arrays;

/**
 * @author yuisama
 * @date 2022/01/07 19:58
 **/
public class Test {
    public static void main(String[] args) {
        Student stu1 = new Student("铭哥",18);
        Student stu3 = new Student("铭哥",30);
        Student stu2 = new Student("郝文雪",20);
        Student[] students = {stu1,stu3,stu2};
        AgeDeSec ageSec = new AgeDeSec();
        Arrays.sort(students,ageSec);
        System.out.println(Arrays.toString(students));
    }
}